/*
 * @Author: your name
 * @Date: 2021-06-02 18:52:19
 * @LastEditTime: 2025-05-16 16:28:27
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Description: In User Settings Edit
 * @FilePath: \bda-portrait-app\proxy.js
 */
module.exports = {
  // 智瞰地图
  [process.env.VUE_APP_NWZK_PREFIX]: {
    target: 'http://192.168.2.118:8080',//vpn环境
    // target: 'http://192.168.2.117:8080',//vpn环境
    changeOrigin: true, // 是否跨域
    pathRewrite: {
      ['^' + process.env.VUE_APP_NWZK_PREFIX]: process.env.VUE_APP_NWZK_PREFIX
    },
    onProxyReq: (proxyReq, req) => {
      // http请求
      console.log('[智瞰地图接口] %s %s %s %s', req.method, req.originalUrl, '->', req.url)
    }
  
  },
  [process.env.VUE_APP_NWZK_FEIL_PREFIX]: {
    target: 'http://192.168.2.118:8080',//智瞰文件引入使用的地址及访问接口
    // target: 'http://192.168.2.117:8080',//智瞰文件引入使用的地址及访问接口
    changeOrigin: true, // 是否跨域
    pathRewrite: {
      ['^' + process.env.VUE_APP_NWZK_FEIL_PREFIX]: [process.env.VUE_APP_NWZK_FEIL_PREFIX]
    },

  },
  // 通用模块
  [process.env.VUE_APP_BASIC_PREFIX]: {
    target: process.env.VUE_APP_BASIC_URL,
    changeOrigin: true, // 是否跨域
    pathRewrite: {
      ['^' + process.env.VUE_APP_BASIC_PREFIX]: process.env.VUE_APP_BASIC_PREFIX
    },
    onProxyReq: (proxyReq, req) => {
      // http请求
      // console.log('[基础模块] %s %s %s %s', req.method, req.originalUrl, '->', req.url)
    }
  },
};
